import http from '@/utils/common/http'

/**
 * 发布公告
 * */
export function addNotice (data) {
  return http({
    method: 'post',
    url: '/portal/notice/pushNotice',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 公告首页查询公告列表
 * */
export function queryNoticeList (data) {
  return http({
    method: 'post',
    url: '/portal/notice/queryNoticeList',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 获取公告详情
 * */
export function getNoticeDetails (data) {
  return http({
    method: 'post',
    url: '/portal/notice/getNoticeDetails',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 编辑公告详情
 * */
export function editNotice (data) {
  return http({
    method: 'post',
    url: '/portal/notice/editNotice',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 删除公告
 * */
export function deleteNotice (data) {
  return http({
    method: 'post',
    url: '/portal/notice/deleteNotice',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}
